package com.lqd.mall.basis.code;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 自定义 返回数据的code
 * @author 零起点
 * @create 2022-01-12 10:10
 */

@Getter
@AllArgsConstructor
public class CustomCode  implements ResultCode{

    /**
     * 是否操作成功
     */
    private boolean success;
    /**
     * 状态码
     */
    private int code;
    /**
     * 显示信息
     */
    private String message;

    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
